﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using ALMForCRMToolkit.Models;
using System.Web.Http.Description;

namespace ALMForCRMToolkit.Controllers
{
    [Authorize]
    [RoutePrefix("api/WorkItem")]
    public class WorkItemController : ApiController
    {
        // GET api/workitem
        [HttpGet]
        [ResponseType(typeof(WorkItem))]
        public IHttpActionResult Get()
        {
            return Ok(new List<WorkItem>());
        }

        // GET api/workitem/{value}
        [HttpGet]
        [ResponseType(typeof(WorkItem))]
        public IHttpActionResult Get(string id)
        {
            return Ok(new WorkItem());
        }

        [HttpPost]
        // POST api/workitem        
        public IHttpActionResult Post([FromBody]WorkItem data)
        {
            
            return Ok();
        }

        [HttpPut]
        // PUT api/workitem/{value}
        public IHttpActionResult Put(string id, [FromBody]WorkItem data)
        {
            return Ok();
        }

        [HttpDelete]
        // DELETE api/workitem/{value}
        public IHttpActionResult Delete(string id)
        {
            return Ok();
        }
    }
}
